<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	
	<style type="text/css">
		#add-company{
			
			display:inline;
			margin-right:8px;
		}
		#add{
			position:relative;
		}
		#add-contact{
			display:inline;
		}
		
		
	</style>
	
	<title>CRM-添加联系人</title>
</head>
<body>
		<%@ include file="include/base.jsp" %>
		<%@ include file="include/base-top.jsp" %>
		
		<div id="add" class="container">
			
				<h2 id="add-contact">添加联系人...</h2>
				
				<a id="add-company" href="adcompany.jspx">添加公司</a>
			<hr/>
			
			<div class="span8">
			  <form class="form-horizontal" action="savecontact.jspx" method="post">
				<fieldset>
				  <div class="control-group">
					<label for="input01" class="control-label">姓名</label>
					<div class="controls">
					  <input type="text" id="input01" name="contact.contactname" class="input-xlarge">
					  
					</div>
				  </div>
				  <div class="control-group">
					<label for="optionsCheckbox" class="control-label">职位</label>
					<div class="controls">
						<input type="text" id="input01" name="contact.job" class="input-xlarge">
					</div>
				  </div>
				   <div class="control-group">
					<label for="optionsCheckbox" class="control-label">公司</label>
					<div class="controls">
						<input type="text" id="input01" name="contact.companyname" class="input-xlarge">
					</div>
				  </div>
				  
				  <div class="control-group tel optional">
					 <label for="optionsCheckbox" class="control-label">电话</label>
					  
					  <div class="controls">
					  
						<label id="tel" for="optionsCheckbox" class="control-label">
							<a id="add_tel"  href="javascript:;">
								<small >添加一个电话</small>
							</a>
						</label>
						
						<div id="contact_tel_list_company" style="display:none" class="contact_forms contact_phones">
							
							<input type="text" id="input01" name="contact.tel" class="span3">
							<select class="span1" name="person[contact_phones][][key]" id="person_contact_phones__key">
								<option value="office">公司</option>
								<option value="work">工作</option>
								<option value="mobile">手机</option>
								<option value="fax">传真</option>
								<option value="home">住宅</option>
								<option value="other">其它</option>
							</select>	
							<a id="close_tel" href="javascript:;">X</a>
						</div>
						
					  </div>
					</div>
					
					<div class="control-group email optional">
						<label for="optionsCheckbox" class="control-label">邮箱</label>
					  
						<div class="controls">
							<label id="email" for="optionsCheckbox" class="control-label">
								<a id="add_email"  href="javascript:;">
									<small >添加一个邮箱</small>
								</a>
							</label>
							<div id="contact_email_list_company" style="display:none" class="contact_forms contact_phones">
								
								<input type="text" name="contact.email" id="input01" class="span3">
								<select class="span1" >
									<option value="office">公司</option>
									<option value="work">个人</option>
									<option value="other">其它</option>
								</select>
								<a id="close_email" href="javascript:;">X</a>								
							</div>
					    </div>
					</div>
					
					<div class="control-group email optional">
					 <label for="optionsCheckbox" class="control-label">IM</label>
					  
					  <div class="controls">
					  <label id="im" for="optionsCheckbox" class="control-label">
						<a id="add_im" href="javascript:;">
							<small >添加一个IM</small>
						</a>
					  </label>
						<div id="contact_im_list_company" style="display:none" class="contact_forms contact_phones">
							
							<input type="text" id="input01" name="contact.im" class="span3">
							<select class="span1" >
								<option value="office">公司</option>
								<option value="work">个人</option>
								<option value="other">其它</option>
							</select>
							<a id="close_im" href="javascript:;">X</a>
						</div>
						
					  </div>
					</div>
					
					<div class="control-group email optional">
					 <label for="optionsCheckbox" class="control-label">网站</label>
					  
					  <div class="controls">
					  <label id="website" for="optionsCheckbox" class="control-label">
						<a id="add_website"  href="javascript:;">
							<small >添加一个网站</small>
						</a>
					  </label>
						<div id="contact_website_list_company" style="display:none" class="contact_forms contact_phones">
							
							<input type="text" id="input01" name="contact.website" class="span3">
							<select class="span1" >
								<option value="office">公司</option>
								<option value="work">个人</option>
								<option value="other">其它</option>
							</select>
							<a id="close_website" href="javascript:;">X</a>
						</div>
						
					  </div>
					</div>
					
					<div class="control-group email optional">
					 <label for="optionsCheckbox" class="control-label">地址</label>
					  
					  <div class="controls">
					  <label id="address" for="optionsCheckbox" class="control-label">
						<a id="add_address" href="javascript:;">
							<small >添加一个地址</small>
						</a>
					  </label>
						<div id="contact_address_list_company" style="display:none" class="contact_forms contact_phones">
							
							<input type="text" id="input01" name="contact.address" class="span3">
							<select class="span1" >
								<option value="office">公司</option>
								<option value="work">个人</option>
								<option value="other">其它</option>
							</select>
							<a id="close_address" href="javascript:;">X</a>
						</div>
						
					  </div>
					</div>
					
					<div class="control-group">
						<label for="input01" class="control-label">微博</label>
						<div class="controls">
						  <input type="text" id="input01" name="contact.weibo" class="input-xlarge">
						  
						</div>
					</div>
				  
				  <div class="control-group text optional">
					<label for="person_others" class="text optional control-label"> 背景信息</label>
						<div class="controls">
							<textarea name="contact.message" id="person_others" ></textarea>
							<p class="help-block">简介，如何认识的等</p>
						</div>
				  </div>
				  
				  <div class="control-group">
						<label for="input01" class="control-label">谁可见</label>
						<div class="controls">
							<div class="radio scope ">
								<input type="radio" value="Owner" name="radio" > 只有我能看见
								<input type="hidden" value="1" >
							</div>
						  
						</div>
						<div class="controls">
							<div class="radio scope ">
								<input type="radio" value="Owner" name="radio"> 同事
								<input type="hidden" value="2" >
							</div>
						  
						</div>
					</div>
				  
				  <div class="form-actions">
					<button class="btn btn-primary btn-small" type="submit">&nbsp&nbsp保存联系人&nbsp&nbsp</button>
					<button class="btn">取消</button>
				  </div>
				</fieldset>
			  </form>
			  
			</div>
			<div class="span3 well">
				<h2>选择我们,选择成功!</h2><br/>
				<h4>机会从中来</h4><br/>
				<h4>机遇从中来</h4><br/>
				<h4>成功自然来</h4><br/>
			
			</div>
		
		</div>
		
		
	<script type="text/javascript">
		$(document).ready(function(){
			$('#add_tel').click(function(){
				$('#add_tel').parent().hide();
				$('#contact_tel_list_company').show();
			});
			$('#add_email').click(function(){
				$('#add_email').parent().hide();
				$('#contact_email_list_company').show();
			});
			$('#add_im').click(function(){
				$('#add_im').parent().hide();
				$('#contact_im_list_company').show();
			});
			$('#add_website').click(function(){
				$('#add_website').parent().hide();
				$('#contact_website_list_company').show();
			});
			$('#add_address').click(function(){
				$('#add_address').parent().hide();
				$('#contact_address_list_company').show();
			});
			
			
			$('#close_tel').click(function(){
				$('#close_tel').parent().hide();
				$('#tel').show();
			});
			$('#close_email').click(function(){
				$('#close_email').parent().hide();
				$('#email').show();
			});
			$('#close_im').click(function(){
				$('#close_im').parent().hide();
				$('#im').show();
			});
			$('#close_website').click(function(){
				$('#close_website').parent().hide();
				$('#website').show();
			});
			$('#close_address').click(function(){
				$('#close_address').parent().hide();
				$('#address').show();
			});
			
			
		});
	</script>
		

	
</body>
</html>
